<template>
  <div>
    <div class="container clearfix">
      <div class="menu_sub">
        <div class="in clearfix">
          <router-link to="/counsel" exact class="menu_sub_link counsel_1">智能咨询
          </router-link>
          <router-link to="/counsel/b" class="menu_sub_link counsel_2">人工在线
          </router-link>
        </div>
      </div>
    </div>
    <div class="banner"></div>
    <div class="menu_bar">
      <div class="container clearfix">
        <div class="right fr">
          当前位置：首页 > {{menu_text}}
        </div>
      </div>
    </div>
    <transition name="fade" mode="out-in">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        menu_text: '智能咨询'
      }
    },
    watch: {
      '$route' (to, from) {
        to.path === '/counsel/b' ? this.menu_text = '人工在线' : this.menu_text = '智能咨询'
      }
    }
  }
</script>

<style scoped>
.banner {
  height: 200px;
  background: url(../../static/images/5-banner.jpg) center;
}
</style>

